<template>
	<view>
		<view class="plr10">
			<view class="bgliner ptb15 pl15 flex radius2 mt10" v-for="(item,index) in list" :key="item.id">
				<image :src="$domain+item.sjwnb" class="wt50 h50 radius50p" mode=""></image>
				<view class="white flex1 plr15">
					<text class="ft16">{{item.name}}</text>
					<view class="flex alcenter between mt10">
						<view class="">奖励比例 {{item.rate_of_reward *100}} %</view>
						<view class="flex alcenter radius2" @tap="buy(item.id)" style="border:1px solid #f9bb57;color: #f9bb57;padding: 4upx 30upx;">
							<text class="">购买</text> 
						</view>
					</view>
				</view>
			</view>
			<view class="tc pt30 pb100" v-if='list.length==0'>
				<image src="/static/image/nodata.png" class="w50 h120"></image>
				<view class="gray7">{{$t('home.norecord')}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[],
				page:1,
				hasMore:true
			}
		},
		onShow() {
			this.getList();
		},
		methods: {
			buy(id){
				this.$utils.initDataToken({ url: 'added/upgrade_account', data: {id:id}, type: 'post' }, (res, msg) => {
	                this.$utils.showLayer(msg);
				});
			},
			getList(){
				let that = this;
				that.$utils.noshowToken({ url: 'added/option_upgrade',data:{page:that.page,limit:10}}, res => {
					var data = res;
					this.list =data;
				});
			}
		}
	}
</script>

<style>
.ltcBg{
	background: url(../../static/image/ltc.png) no-repeat;
	background-size: 100%;
}
</style>
